home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / MacHack 90 Contest Entries / Surovell Stuffƒ / VBLƒ / VBLTasks.h < prev   
Encoding:
C/C++ Source or Header  |  1990-06-14  |  1.4 KB  |  80 lines  |  [TEXT/KAHL]

  1. /*
  2.     Copyright © 1988,1989,1990 by
  3.         David A. Surovell,
  4.         Succinct Systems
  5.         433 Huronview
  6.         Ann Arbor, MI 48103
  7.         (313) 663-4903
  8.         AppleLink: (none yet)
  9.  
  10.     ••• All Rights Reserved. •••
  11.  
  12.     File:         VBLTasks.h
  13.     Model:         THINK C 4.0, MPW C 3.0, Aztec C 3.0
  14.  
  15.     ABSTRACT:
  16.         vertical-blank task handling routines.
  17.  
  18.     NOTES:
  19.         ---
  20.  
  21.     KNOWN BUGS:
  22.         ---
  23.  
  24.     HISTORY:
  25.         DAS    01-Jun-90    did it here first
  26. */
  27.  
  28. #define _H_VBLTasks
  29.  
  30. #ifndef NULL
  31. #define NULL            0L
  32. #endif NULL
  33.  
  34. /* tasks will be executed every VBLANK_RATE vertical blanks */
  35. #define VBLANK_RATE        1
  36.  
  37. /* add more elements to this stucture if needed */
  38. typedef struct
  39. {
  40.     VBLTask        vbl;
  41.     long        A5World;
  42. }
  43. VBLTaskInfoRec, *VBLTaskInfoPtr;
  44.  
  45.  
  46. /*
  47. **    install generic task stub on specified GDevice:
  48. **        task info ptr returned on success
  49. **        NULL returned on failure
  50. */
  51. VBLTaskInfoPtr InstallVBTask(
  52.     GDHandle    theGDev );
  53.  
  54. /*
  55. **    obtain slot number of specified GDevice
  56. */
  57. unsigned short GDGetSlotID(
  58.     GDHandle    theGDev );
  59.  
  60. /*
  61. **    set A5 context, dispatch VBTask, refresh vbl counter
  62. **    including additional task handler
  63. */
  64. pascal void DispatchVBTask( void );
  65.  
  66. /*
  67. **    install a routine to handle additional VB task activities:
  68. **    must be of type "void FunctionName( void )"
  69. */
  70. void SetVBHandler(
  71.     ProcPtr        theVBHandler );
  72.  
  73. /*
  74. **    set flag to enable a VBTask to renew itself;
  75. **    clear to kill a running VBTask
  76. */
  77. void SetVBLTaskStatus(
  78.     Boolean        newTaskStatus );
  79.  
  80.